package com.lagou.zuoye.service;

import com.lagou.zuoye.bean.User;
import com.lagou.zuoye.dao.UserDao;
import com.lagou.zuoye.factory.UserDaoFactory;

public class UserService {

    //合成复用原则
    private UserDao userDao;

    public UserService(){
        this.userDao= UserDaoFactory.getUserDao();
    }

    //自定义成员方法实现根据参数指定的User对象来调用DAO层实现登录功能
    public User userLoginService(User user){
       return userDao.userLogin(user);
    }
}
